home *** CD-ROM | disk | FTP | other *** search
- class BOSS1BodyAttack4 extends EnemyAction {
- private int nTime = 0;
- private int nMode = 0;
- private int fxSpeed = -1048576;
- private int fxInit;
- private int fxAdd;
- private int nMove;
-
- public BOSS1BodyAttack4(StgFrame var1) {
- super(var1);
- }
-
- public boolean action(EnemyIndex var1) {
- super.resource.getEnemy();
- BOSS1Index var2 = (BOSS1Index)var1;
- switch (this.nMode) {
- case 0:
- this.LegIn(var2);
- break;
- case 1:
- this.Jump(var2);
- break;
- case 2:
- this.LegOut(var2);
- break;
- case 3:
- this.Return(var2);
- break;
- case 4:
- var1.setEnemyAction(new BOSS1BodyNomal(super.resource));
- }
-
- this.destroy(var1);
- return true;
- }
-
- private void LegIn(BOSS1Index var1) {
- BOSS1Index var2 = var1.getDefectIndex();
- ((StgObjectIndex)var1).movePosition(0, 49152, 0);
- ((StgObjectIndex)var2).movePosition(0, 49152, 0);
- ++this.nTime;
- if (this.nTime == 8) {
- this.nMode = 1;
- this.nTime = 0;
- }
-
- }
-
- private void Jump(BOSS1Index var1) {
- BOSS1Index var2 = var1.getLegIndex();
- BOSS1Index var3 = var1.getDefectIndex();
- int var4 = this.fxSpeed;
- ((StgObjectIndex)var1).movePosition(-262144, var4, 0);
- ((StgObjectIndex)var2).movePosition(-262144, var4, 0);
- ((StgObjectIndex)var3).movePosition(-262144, var4, 0);
- this.fxSpeed += 65536;
- ++this.nTime;
- if (this.nTime == 32) {
- ((StgObjectIndex)var1).movePosition(0, 1048576, 0);
- ((StgObjectIndex)var2).movePosition(0, 1048576, 0);
- ((StgObjectIndex)var3).movePosition(0, 1048576, 0);
- this.nMode = 2;
- this.nTime = 0;
- }
-
- }
-
- private void LegOut(BOSS1Index var1) {
- BOSS1Index var2 = var1.getDefectIndex();
- ((StgObjectIndex)var1).movePosition(0, -49152, 0);
- ((StgObjectIndex)var2).movePosition(0, -49152, 0);
- ++this.nTime;
- if (this.nTime == 8) {
- this.nMode = 3;
- this.nTime = 0;
- }
-
- }
-
- private void Return(BOSS1Index var1) {
- BOSS1Index var2 = var1.getLegIndex();
- BOSS1Index var3 = var1.getDefectIndex();
- ((StgObjectIndex)var1).movePosition(131072, 0, 0);
- ((StgObjectIndex)var2).movePosition(131072, 0, 0);
- ((StgObjectIndex)var3).movePosition(131072, 0, 0);
- ++this.nTime;
- if (this.nTime == 64) {
- this.nMode = 4;
- this.nTime = 0;
- }
-
- }
-
- private boolean ReturnMode0(BOSS1Index var1) {
- BOSS1Index var2 = var1.getLegIndex();
- BOSS1Index var3 = var1.getDefectIndex();
- if (this.nTime == 0) {
- if ((Fixed.Random() & 'ΦÇÇ') != 0) {
- this.fxSpeed = 131072;
- } else {
- this.fxSpeed = -131072;
- }
- }
-
- if (this.nTime == 15) {
- this.fxSpeed = -this.fxSpeed;
- ((StgObjectIndex)var1).movePosition(1048576, 0, 0);
- ((StgObjectIndex)var2).movePosition(1048576, 0, 0);
- ((StgObjectIndex)var3).movePosition(1048576, 0, 0);
- }
-
- ((StgObjectIndex)var1).movePosition(this.fxSpeed, 0, 0);
- ((StgObjectIndex)var2).movePosition(this.fxSpeed, 0, 0);
- ((StgObjectIndex)var3).movePosition(this.fxSpeed, 0, 0);
- ++this.nTime;
- if (this.nTime == 32) {
- ((StgObjectIndex)var1).movePosition(1048576, 0, 0);
- ((StgObjectIndex)var2).movePosition(1048576, 0, 0);
- ((StgObjectIndex)var3).movePosition(1048576, 0, 0);
- this.nTime = 0;
- return true;
- } else {
- return false;
- }
- }
-
- public boolean checkHitPlayerShip(EnemyIndex var1, PlayerShipIndex var2) {
- super.resource.getEnemy();
- return ((StgObjectIndex)var1).checkHit(var2);
- }
-
- public boolean checkHitPlayerShot(EnemyIndex var1, PlayerShotIndex var2) {
- boolean var3 = false;
- super.resource.getEnemy();
- if (((StgObjectIndex)var1).checkHit(var2)) {
- var3 = true;
- }
-
- return var3;
- }
-
- public boolean checkHitBom(EnemyIndex var1) {
- return false;
- }
-
- private boolean destroy(EnemyIndex var1) {
- Enemy var2 = super.resource.getEnemy();
- ((StgObjectIndex)var1).getSpriteAnimeIndex();
- boolean var3 = false;
- Status var4 = super.resource.getStatus();
- if (var1.getHitPoint() == 0) {
- var4.add(var1.getScore());
- ((StgObject)var2).delete(var1);
- var3 = true;
- }
-
- return var3;
- }
- }
-